WorkflowDefinitionManagerView = Ext.extend(Ext.Panel, {
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        WorkflowDefinitionManagerView.superclass.constructor.call(this, {
            id : "WorkflowDefinitionManagerView",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel]
        });
    },
    initUIComponents : function() {
         var yearGridComponents=new creategridview({
            topbar : {
                hidden: true,
                topbarAdd:{
                    hidden:true
                },
                topbarDel:{
                    hidden:true
                }
            },
            search : {
                items : [ ]
            },
            grid : {
                title : "流程定义信息列表",
                rowdblclick:false,
                listUrl : __ctxPath + "/bpmndemo/listProcessDefinitionWorkflow.do",
                fields : [ "id", 'name','key','version', "resourceName","diagramResourceName", "deploymentId"],
                columns : [ {
                    header : "ID",
                    dataIndex : "id",
                    width : 100
                },  {
                    header : "流程名称",
                    dataIndex : "name",
                    width : 100
                }, {
                    header : "流程KEY",
                    dataIndex : "key",
                    width : 70
                }, {
                    header : "版本",
                    dataIndex : "version",
                    width : 30
                }, {
                    header : "流程文件名称",
                    dataIndex : "resourceName",
                    width : 100
                },{
                    header:"流程图片名称",
                    dataIndex:"diagramResourceName",
                    width:100
                },{
                    header:"部署ID",
                    dataIndex:"deploymentId",
                    width:70
                },{
                    header:"流程图",
                    dataIndex:"id",
                    width:40,
                    renderer : function(j, i, g, m, h) {
                        var cfg={
                                deploymentId : g.data.deploymentId,
                                diagramResourceName : g.data.diagramResourceName
                        }
                        console.info()
                        var k = "";
                                k += '<button title="查看流程图" value="" class="btn-showDetail" onclick=\'WorkflowDefinitionManagerView.chakanliuchengtu('
                                    + JSON.stringify(cfg) + ')\'></button>';
                        return k;
                    }
                }]
                
            }
        });
        return yearGridComponents;
    }
});
WorkflowDefinitionManagerView.chakanliuchengtu=function(cfg){
    new WorkFlowPngWindow({
        deploymentId:cfg.deploymentId,
        diagramResourceName:cfg.diagramResourceName
    }).show();
}